#include <at89c51RC2.h>
#include "LCD1602.h"
#include "Delay.h"

void main()
{
	unsigned int Num=0;
	LCD_Init();
	
	LCD_ShowBinNum(2,1,Num,16);
	while(1)
	{
//	LCD_ShowChar(1,1,'A');
//	LCD_ShowString(1,1,"Good morning!");
	if(P3_1==0)
		{
			Delay(20);
			while(P3_1==0);
			Delay(20);
			Num++;
			LCD_ShowBinNum(2,1,Num,16);
		}
		
	if(P3_0==0)
		{
			Delay(20);
			while(P3_0==0);
			Delay(20);
			Num--;
			LCD_ShowBinNum(2,1,Num,16);
		}
	}
}